project(chapterFirstExample)
cmake_minimum_required(VERSION 2.6)


get_filename_component(workroot
                       ../../../
                       ABSOLUTE)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)

include_directories(
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${workroot}/googletest-src/googletest/include
   ${workroot}/googletest-src/googlemock/include)

link_directories(
   ${workroot}/lib)

find_package(Threads REQUIRED)

add_definitions(-std=c++0x)
set(CMAKE_CXX_FLAGS "${CMAXE_CXX_FLAGS} -Wall")

set(sources 
   main.cpp 
   RetweetCollectionTest.cpp
   Tweet.cpp
   TweetTest.cpp)
add_executable(main ${sources})

target_link_libraries(main Threads::Threads)
target_link_libraries(main gtest)
TARGET_LINK_LIBRARIES(main gmock)
